Namespace - LJCNetCommon
Parameters
name - The element name.
text - The element content text.
textState - The current text state values.
htmlAttribs - The element attributes.
addIndent -
Indicates if the element can be indented.
childIndent -
Indicates if the child indent should be applied.
isEmpty - Indicates if an empty element.
close - Indicates if the element will be closed.
Returns
The HTML element.
Syntax
C# |
public String GetCreate(String name, String text, TextState textState, Attributes htmlAttribs = null, Boolean addIndent = True, Boolean childIndent = True, Boolean isEmpty = False, Boolean close = True)
|
Gets an element.
Remarks
GetCreate() is a "GetText" method which creates the element or element
opening tag and returns the text value. It is called from other element
create methods.
The addIndent parameter defaults to true, which starts the text with the
current indent string.
The isEmpty element defaults to false, which does not add the empty
element slash.
If isEmpty is true, the empty element slash is added and the close
parameter is ignored. The element will not include the closing tag.
The ChildIndentCount is incremented if the element is not empty and
not closed.
Example
C# |
var textState = new TextState();
var hb = new HTMLBuilder(textState);
hb.Create("head", null, textState);
var result = hb.ToString();
|
Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.